export default{
    generateRoute(menuList) {
        let routes = []
        const deepList = (list) => {
            while (list.length) {
                let item = list.pop()
                // console.log("item-->",item)
                if (item.stepType === 1) {
                    routes.push({
                        name: item.component,
                        path: item.path,
                        parentPath: item.parentPath,
                        meta: {
                            title: item.label
                        },
                        component: item.component
                    })
                }
                if (item.children) {
                    deepList(item.children)
                }
            }
        }
        deepList(menuList)
        return routes;
    }
}